//
//  Fraction.h
//  ClassAddObjectHomework
//
//  Created by dllo on 16/7/5.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface Fraction : NSObject
@property(nonatomic,assign)NSInteger numerator;
@property(nonatomic,assign)NSInteger denominator;

- (void)output;
- (void)reduce;
- (NSInteger)compareResult :(Fraction *)f;
- (Fraction *) add: (Fraction *) f;
- (Fraction *) sub: (Fraction *) f;
- (Fraction *) mul: (Fraction *) f;
- (Fraction *) div: (Fraction *) f;

- (instancetype)initWithNumerator:(NSInteger)numerator
                      denominator:(NSInteger)denominator;

+ (instancetype)fractionWithNumerator:(NSInteger)numerator
                          denominator:(NSInteger)denominator;
@end
